package com.cool.service.smallclass.impl;

import com.cool.bo.SmallSelectLike;
import com.cool.mapper.smallmapper.SmallMapper;
import com.cool.po.bigclasspo.BigClassPo;
import com.cool.po.smallclasspo.SmallClassPo;
import com.cool.service.smallclass.SmallClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 商品小类业务层实现类
 */
@Service
public class SmallClassServiceImpl implements SmallClassService {
    //注入数据层
    @Autowired
    private SmallMapper smallMapper;
    /**
     * 查询出所有大类下拉框
     */
    @Override
    public List<BigClassPo> getbigClass() {
        List<BigClassPo> list = smallMapper.getbigClass();
        return list;
    }
    /**
     * 根据下拉框和输入框模糊查询
     */
    @Override
    public List<Map<String, Object>> selectLike(SmallSelectLike smallSelectLike) {
        List<Map<String, Object>> list = smallMapper.selectLike(smallSelectLike);
        return list;
    }
    /**
     * 查询所有信息
     */
    @Override
    public List<Map<String, Object>> selectAll() {
        List<Map<String, Object>> list = smallMapper.selectAll();
        return list;
    }
    /**
     *修改商品小类
     */
    @Override
    public void updatesmallClass(SmallClassPo smallClassPo) {
        smallMapper.updatesmallClass(smallClassPo);
    }
}
